﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace EmaMetadata
{
    public class EmaBatch
    {
        public List<EmaProduct> Products = new List<EmaProduct>();

        /// <summary>
        /// The "record version" number of the ema metadata file
        /// </summary>
        public string RecordVersion = "4";

        /// <summary>
        /// The latest revision change to this file
        /// </summary>
        public Nullable<DateTime> LastUpdateDate;

        /// <summary>
        /// The default unit of measurement for distance measurements (inches, cm, etc)
        /// UN ECE Codes, Table: Dimension Measurements
        /// </summary>
        public string DefaultDistanceUOM;

        /// <summary>
        /// The default unit of measurement for mass measurements (lbs, kg, etc)
        /// UN ECE Codes, Table: Weight Measurements
        /// </summary>
        public string DefaultMassUOM;

        /// <summary>
        /// Friendly name of the metadata creator
        /// </summary>
        public string MetadataCreatorName;

        /// <summary>
        /// GS1.org Global Location Number of the metadata creator, if any
        /// </summary>
        public string MetadataCreatorGLN;

        /// <summary>
        /// Fully qualified domain name of the metadata creator, if available
        /// </summary>
        public string MetadataCreatorFQDN;


        #region Controller Methods
        public void AddProduct(EmaProduct emaProduct)
        {
            if (Products == null) {
                Products = new List<EmaProduct>();
            }
            Products.Add(emaProduct);
        }
        #endregion
    }
}
